<%-- 
    Document   : foodgrouplang
    Created on : Nov 8, 2011, 10:49:24 PM
    Author     : Venus
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.util.*,Beans.ThamSoHT,Models.NgonNgu_Model,Models.ThamSoHT_Model"%>
<%
            int langid = (Integer) session.getAttribute("langid"); // ngôn ngữ hiện tại
            String dsts = " 'language', 'rightmsg', 'foodgroupsname','order','status','action','foodgrouplang', 'notice', 'chkfoodgroupmsg' "; // chuỗi chứa các mã tham số của trang này.
            ThamSoHT[] mdsts = ThamSoHT_Model.DSThamSo(dsts, langid); // mảng chứa các tham số của trang này.

            String action = mdsts[0].getTenTS();
            String chkfoodgroupmsg = mdsts[1].getTenTS();
            String foodgrouplang = mdsts[2].getTenTS();
            String foodgroupsname = mdsts[3].getTenTS();
            String language = mdsts[4].getTenTS();
            String notice = mdsts[5].getTenTS();
            String order = mdsts[6].getTenTS();
            String status = mdsts[7].getTenTS();
            String rightmsg = mdsts[7].getTenTS();
            String msgright = notice + "/" + rightmsg;

            String msg = notice + "/" + chkfoodgroupmsg;

            Vector v = (Vector) request.getAttribute("LangFG");
%>

<div class="bloc">
    <div class="title">
        <%=foodgrouplang%>        
    </div>
    <div class="content">
        <table>
            <thead>
                <tr>
                    <th style="width: 80px; padding-bottom: 5px;"><%=order%></th>
                    <th style="width: 150px; padding-bottom: 5px;"><%=language%></th>
                    <th style="width: 280px; padding-bottom: 5px;"><%=foodgroupsname%></th>
                    <th style="width: 120px; padding-bottom: 5px;"><%=action%></th>
                </tr>
            </thead>
            <tbody id="area">
                <%
                            for (int i = 0; i < v.size(); i++) {
                                Beans.NhomMA nma = (Beans.NhomMA) v.elementAt(i);
                %>
                <tr>
                    <td style=" padding-left: 10px;"><%= i + 1%></td>
                    <td><%= Models.NgonNgu_Model.TenNgonNgu(nma.getMaNN())%></td>
                    <td><div id="tenkv_<%= nma.getMaNN()%>"><%= nma.getTenNMA()%></div></td>
                    <td>
                        <a href="#" name="<%= nma.getMaNN()%>" class="<%=nma.getTenNMA()%>" onclick="Edit_tenNMA(this.name, this.className)"><img style=" margin-right: 15px; width: 17px; margin-top: 2px;" alt="" src="../images/edit.png"></a>
                        <a href="#"   name="<%= nma.getMaNMA()%>" class="<%= nma.getMaNN()%>" lang="<%=msgright%>" onclick="Save_editNMA(this.name, this.className, this.lang)"><img style="width: 20px;" alt="" src="../images/save.png"></a>
                        <input type="hidden" id="foodgroupexist" value="<%=msg%>">
                    </td>
                </tr>
                <%  }
                %>
            </tbody>
        </table>
    </div>
</div>
